package com.itlong.cloud.project.operate;

import com.itlong.cloud.POJO.DTO.operate.OperateParkingLotManageInfoDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateParkingLotManagePageDTO;
import com.itlong.cloud.POJO.VO.operate.OperateParkingLotManageInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <desc>
 *      运营-指挥停车-停车场接口暴露接口。
 * <desc/>
 *
 * @createDate 2018-11-05.
 */
@FeignClient(name = "project-service")
public interface IOperateParkingLotManageServiceClient {

    /**
     * <desc>
     *      停车场信息分页查询
     * <desc/>
     *
     * @param  operateParkingLotManagePageDTO 分页查询参数
     * @return
     * @author Qiang.S
     * @createDate 2018-11-05
     */
    @RequestMapping(path = "/operate/parking/parkingLotManage/getParkingLotPage", method = {RequestMethod.POST})
    Page<OperateParkingLotManageInfoVO> getParkingLotPage(@RequestBody OperateParkingLotManagePageDTO operateParkingLotManagePageDTO) throws Exception;

    /**
     * <desc>
     *      新增停车场
     * <desc/>
     *
     * @param operateParkingLotManageInfoDTO 停车场信息
     * @return
     * @author Qiang.S
     * @createDate 2018-11-05
     */
    @RequestMapping(path = "/operate/parking/parkingLotManage/save", method = {RequestMethod.POST})
    Integer save(@RequestBody OperateParkingLotManageInfoDTO operateParkingLotManageInfoDTO) throws Exception;

    /**
     * <desc>
     *      更新停车场
     * <desc/>
     *
     * @param operateParkingLotManageInfoDTO 停车场信息
     * @return
     * @author Qiang.S
     * @createDate 2018-11-05
     */
    @RequestMapping(path = "/operate/parking/parkingLotManage/update", method = {RequestMethod.POST})
    Integer update(@RequestBody OperateParkingLotManageInfoDTO operateParkingLotManageInfoDTO) throws Exception;

    /**
     * <desc>
     *      判断停车场是否被使用
     * <desc/>
     *
     * @param parkId 停车场编号
     * @return
     * @author Qiang.S
     * @createDate 2018-11-05
     */
    @RequestMapping(path = "/operate/parking/parkingLotManage/checkParkingLot", method = {RequestMethod.POST})
    Integer checkParkingLot(@RequestParam("parkId")String parkId) throws Exception;

    /**
     * <desc>
     *      判断该项目是否已有停车场
     * <desc/>
     *
     * @param projectId 项目编号
     * @return
     * @author Qiang.S
     * @createDate 2018-11-05
     */
    @RequestMapping(path = "/operate/parking/parkingLotManage/checkParkingRepeat", method = {RequestMethod.POST})
    Integer checkParkingRepeat(@RequestParam("projectId")String projectId) throws Exception;

    /**
     * <desc>
     *      删除停车场
     * <desc/>
     *
     * @param parkId 停车场编号
     * @return
     * @author Qiang.S
     * @createDate 2018-11-05
     */
    @RequestMapping(path = "/operate/parking/parkingLotManage/delete", method = {RequestMethod.POST})
    Integer delete(@RequestParam("parkId")String parkId) throws Exception;

    /**
     * <desc>
     *      根据停车场编号获取停车场信息
     * <desc/>
     *
     * @param parkId 停车场编号
     * @return
     * @author Qiang.S
     * @createDate 2018-11-05
     */
    @RequestMapping(path = "/operate/parking/parkingLotManage/getDetail", method = {RequestMethod.POST})
    OperateParkingLotManageInfoVO getDetail(@RequestParam("parkId") String parkId) throws Exception;

}
